﻿using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using DIBestPractice.Repository.Store;

namespace DIBestPractice.Repository.WindsorInstallers
{
    public class DbStoreInstaller:IWindsorInstaller
    {
        public void Install(IWindsorContainer container, IConfigurationStore store)
        {
            container.Register(
                Component.For(typeof(IDBStore<>)).ImplementedBy(typeof(InMemoryDbStore<>)).LifestyleScoped()
                );
        }
    }
}